package com.evil.activiti.enums;

import com.evil.common.activiti.enums.ListenerTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.activiti.engine.delegate.BaseExecutionListener;
import org.activiti.engine.delegate.BaseTaskListener;

/**
 * 监听器事件 类型
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@AllArgsConstructor
public enum EventTypeEnum {

    /**
     * 监听器事件 类型
     */
    START(BaseExecutionListener.EVENTNAME_START, ListenerTypeEnum.EXECUTION, "开始"),
    END(BaseExecutionListener.EVENTNAME_END, ListenerTypeEnum.EXECUTION, "结束"),
    TAKE(BaseExecutionListener.EVENTNAME_TAKE, ListenerTypeEnum.EXECUTION, "执行"),
    CREATE(BaseTaskListener.EVENTNAME_CREATE, ListenerTypeEnum.TASK, "创建"),
    ASSIGNMENT(BaseTaskListener.EVENTNAME_ASSIGNMENT, ListenerTypeEnum.TASK, "分配负责人"),
    COMPLETE(BaseTaskListener.EVENTNAME_COMPLETE, ListenerTypeEnum.TASK, "完成"),
    DELETE(BaseTaskListener.EVENTNAME_DELETE, ListenerTypeEnum.TASK, "删除"),
    ;

    @Getter
    private final String event;
    @Getter
    private final ListenerTypeEnum type;
    @Getter
    private final String name;
}